﻿Type.registerNamespace("Microsoft.Live.ClientControls.VE.Extenders")
Microsoft.Live.ClientControls.VE.Extenders.Traffic=function(element){
Microsoft.Live.ClientControls.VE.Extenders.Traffic.initializeBase(this,[element])
this._toggleTraffic
this._toggleTrafficLegend
this._showTraffic
this._showTrafficLegend
this._hideTraffic
this._hideTrafficLegend
this._trafficLegendText
this._mapControlID}
Microsoft.Live.ClientControls.VE.Extenders.Traffic.prototype={
initialize : function(){
Microsoft.Live.ClientControls.VE.Extenders.Traffic.callBaseMethod(this,'initialize')
$addHandler(this.get_element(),"click",Function.createDelegate(this,this._onClick))
},
get_ToggleTraffic : function(){
return this._toggleTraffic
},
set_ToggleTraffic : function(value){
this._toggleTraffic=value
},
get_ToggleTrafficLegend : function(){
return this._toggleTrafficLegend
},
set_ToggleTrafficLegend : function(value){
this._toggleTrafficLegend=value
},
get_ShowTraffic : function(){
return this._showTraffic
},
set_ShowTraffic : function(value){
this._showTraffic=value
},
get_ShowTrafficLegend : function(){
return this._showTrafficLegend
},
set_ShowTrafficLegend : function(value){
this._showTrafficLegend=value
},
get_HideTraffic : function(){
return this._hideTraffic
},
set_HideTraffic : function(value){
this._hideTraffic=value
},
get_HideTrafficLegend : function(){
return this._hideTrafficLegend
},
set_HideTrafficLegend : function(value){
this._hideTrafficLegend=value
},
get_TrafficLegendText : function(){
return this._trafficLegendText
},
set_TrafficLegendText : function(value){
this._trafficLegendText=value
},
get_MapControlID : function(){
return this._mapControlID
},
set_MapControlID : function(value){
this._mapControlID=value
},
_onClick : function(e){
var mapcontrol=$find(this._mapControlID)
if(mapcontrol){
if(this._toggleTraffic){
mapcontrol.set_Traffic(!mapcontrol.get_Traffic())}
if(this._toggleTrafficLegend){
mapcontrol.set_TrafficLegend(!mapcontrol.get_TrafficLegend())}
if(this._showTraffic){
mapcontrol.set_Traffic(true)}
if(this._hideTraffic){
mapcontrol.set_Traffic(false)}
if(this._showTrafficLegend){
mapcontrol.set_TrafficLegend(true)}
if(this._hideTrafficLegend){
mapcontrol.set_TrafficLegend(false)}
if(this._trafficLegendText !=""){
mapcontrol.set_TrafficLegendText(this._trafficLegendText)}}
e.preventDefault()
},
dispose : function(){
$clearHandlers(this.get_element())
Microsoft.Live.ClientControls.VE.Extenders.Traffic.callBaseMethod(this,'dispose')}}
Microsoft.Live.ClientControls.VE.Extenders.Traffic.registerClass("Microsoft.Live.ClientControls.VE.Extenders.Traffic",Sys.UI.Behavior)
if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded()
